<html>
<head><meta charset="utf-8"><title>RUSTFLAGS_NOT_BOOTSTRAP ignored for rustc · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html">RUSTFLAGS_NOT_BOOTSTRAP ignored for rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212098406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212098406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212098406">(Oct 02 2020 at 16:35)</a>:</h4>
<p>When I use <code>RUSTFLAGS_NOT_BOOTSTRAP</code> the flags are passed while building stage1 std artifacts, but not while building stage 1 compiler artifacts.  In all cases the invoked rustc is <code>build/x86_64-unknown-linux-gnu/stage1/bin/rustc</code>. I need to pass a certain flag to all invocations of <code>build/x86_64-unknown-linux-gnu/stage1/bin/rustc</code>.</p>



<a name="212103165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212103165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212103165">(Oct 02 2020 at 17:17)</a>:</h4>
<p>I'm using this myself right now, and it seems to be working fine</p>



<a name="212103203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212103203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212103203">(Oct 02 2020 at 17:17)</a>:</h4>
<p><code>pgrep</code> shows me multiple rustc crates being built including my flags</p>



<a name="212103556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212103556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212103556">(Oct 02 2020 at 17:21)</a>:</h4>
<p>For me it gives an ICE due to a missing flag (<code>-Ztrim-diagnostic-paths=no</code>, necessary for cg_clif)</p>



<a name="212103942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212103942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212103942">(Oct 02 2020 at 17:25)</a>:</h4>
<p>Maybe rustc is ignoring the flag?</p>



<a name="212104128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212104128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212104128">(Oct 02 2020 at 17:26)</a>:</h4>
<p>No, I looked at <code>-vv</code> and the flag was not passed.</p>



<a name="212105824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212105824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212105824">(Oct 02 2020 at 17:41)</a>:</h4>
<p>but it does for <code>std</code> crates? very strange</p>



<a name="212105846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212105846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212105846">(Oct 02 2020 at 17:41)</a>:</h4>
<p>Yes</p>



<a name="212106024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212106024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212106024">(Oct 02 2020 at 17:43)</a>:</h4>
<p>I have <code>RUSTFLAGS_NOT_BOOTSTRAP=-Zprecise-enum-drop-elaboration=no</code> for testing with <a href="https://github.com/rust-lang/rust/issues/77423">#77423</a>, and it's very clearly present in my <code>stage1/bin/rustc</code> invocations</p>



<a name="212106086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212106086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212106086">(Oct 02 2020 at 17:44)</a>:</h4>
<p>maybe there are some edge cases where that's missing though, and I wouldn't notice</p>



<a name="212107208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212107208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212107208">(Oct 02 2020 at 17:54)</a>:</h4>
<p>Could it be related to <code>full-bootstrap = true</code>?</p>



<a name="212111043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212111043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212111043">(Oct 02 2020 at 18:29)</a>:</h4>
<p>Shouldn't be, but not impossible</p>



<a name="212115192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212115192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212115192">(Oct 02 2020 at 19:06)</a>:</h4>
<p>Setting <code>full-bootstrap = false</code> didn't make any change.</p>



<a name="212118920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP%20ignored%20for%20rustc/near/212118920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTFLAGS_NOT_BOOTSTRAP.20ignored.20for.20rustc.html#212118920">(Oct 02 2020 at 19:37)</a>:</h4>
<p>Found it. The specific crate had to be compiled for the host. This meant that RUSTFLAGS is ignored. It still compiled with the stage1 rustc, so I had a problem. Changing <code>bootstrap/bin/rustc.rs</code> to pass the right arg for stage1 fixed it.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>